<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:loc="clr-namespace:ResourceBlender_Express">

    <!-- Hybrid controls -->    
    <Style x:Key="ApplicationRadioListTemplate" TargetType="ListBox" BasedOn="{StaticResource {x:Type ListBox}}">
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="BorderThickness" Value="0" />
        <Setter Property="ItemContainerStyle">
            <Setter.Value>
                <Style TargetType="{x:Type ListBoxItem}">
                    <Setter Property="Margin" Value="2" />
                    <Setter Property="Template">
                        <Setter.Value>
                            <ControlTemplate TargetType="{x:Type ListBoxItem}">
                                <RadioButton IsChecked="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type ListBoxItem}},Path=IsSelected}">
                                    <ContentPresenter />
                                </RadioButton>
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </Style>
            </Setter.Value>
        </Setter>
    </Style>
    
    <Style x:Key="RadioListTemplate" TargetType="ListBox" BasedOn="{StaticResource {x:Type ListBox}}">
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="BorderThickness" Value="0" />
        <Setter Property="OverridesDefaultStyle" Value="true"/>
        <Setter Property="ItemContainerStyle">
            <Setter.Value>
                <Style TargetType="{x:Type ListBoxItem}">
                    <Setter Property="Margin" Value="2" />
                    <Setter Property="Template">
                        <Setter.Value>
                            <ControlTemplate TargetType="{x:Type ListBoxItem}">
                                <RadioButton IsChecked="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type ListBoxItem}},Path=IsSelected}">
                                    <ContentPresenter />
                                </RadioButton>
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </Style>
            </Setter.Value>
        </Setter>
    </Style>
    
    <DataTemplate DataType="{x:Type loc:RBApplication}">
        <TextBlock Text="{Binding DisplayName}" />
    </DataTemplate>
    <DataTemplate x:Key="DictionaryList">
        <TextBlock Text="{Binding Value}" />
    </DataTemplate>
</ResourceDictionary>